package com.navigationtest;

import android.view.View;

import com.hjq.bar.OnTitleBarListener;
import com.myatest.BR;
import com.myatest.R;
import com.pbase.ui.page.DataBindingConfig;

/**
 * User: psn
 * Date: 2021/12/11
 */
public class Test2Fragment extends NavigationViewFragment {
    private Test2ViewModel mViewModel;

    @Override
    protected void onCreateViewBefore() {

    }

    @Override
    protected void onCreateViewAfter() {
        super.onCreateViewAfter();
    }

    @Override
    protected void initViewModel() {
        mViewModel = getFragmentScopeViewModel(Test2ViewModel.class);
    }

    @Override
    protected DataBindingConfig getDataBindingConfig() {
        return new DataBindingConfig(R.layout.frg_text2, BR.vm, mViewModel).addBindingParam(BR.OnTitleBarListener, new TitleBarListener());
    }

    public class TitleBarListener implements OnTitleBarListener {

        @Override
        public void onLeftClick(View view) {
            left();
        }

        @Override
        public void onTitleClick(View view) {

        }

        @Override
        public void onRightClick(View view) {

        }
    }


}
